package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhPlatformPartsCheckMapper;
import com.ruoyi.zsyh.domain.ZsyhPlatformPartsCheck;
import com.ruoyi.zsyh.service.IZsyhPlatformPartsCheckService;
import com.ruoyi.common.core.text.Convert;

/**
 * 配件鉴定权Service业务层处理
 * 
 * @author yuexl
 * @date 2022-02-09
 */
@Service
public class ZsyhPlatformPartsCheckServiceImpl implements IZsyhPlatformPartsCheckService 
{
    @Autowired
    private ZsyhPlatformPartsCheckMapper zsyhPlatformPartsCheckMapper;

    /**
     * 查询配件鉴定权
     * 
     * @param id 配件鉴定权ID
     * @return 配件鉴定权
     */
    @Override
    public ZsyhPlatformPartsCheck selectZsyhPlatformPartsCheckById(Long id)
    {
        return zsyhPlatformPartsCheckMapper.selectZsyhPlatformPartsCheckById(id);
    }

    /**
     * 查询配件鉴定权列表
     * 
     * @param zsyhPlatformPartsCheck 配件鉴定权
     * @return 配件鉴定权
     */
    @Override
    public List<ZsyhPlatformPartsCheck> selectZsyhPlatformPartsCheckList(ZsyhPlatformPartsCheck zsyhPlatformPartsCheck)
    {
        return zsyhPlatformPartsCheckMapper.selectZsyhPlatformPartsCheckList(zsyhPlatformPartsCheck);
    }

    /**
     * 新增配件鉴定权
     * 
     * @param zsyhPlatformPartsCheck 配件鉴定权
     * @return 结果
     */
    @Override
    public int insertZsyhPlatformPartsCheck(ZsyhPlatformPartsCheck zsyhPlatformPartsCheck)
    {
        zsyhPlatformPartsCheck.setCreateTime(DateUtils.getNowDate());
        return zsyhPlatformPartsCheckMapper.insertZsyhPlatformPartsCheck(zsyhPlatformPartsCheck);
    }

    public int insertZsyhPlatformPartsCheckBatch(List<ZsyhPlatformPartsCheck> list){
        return zsyhPlatformPartsCheckMapper.insertZsyhPlatformPartsCheckBatch(list);
    }

    /**
     * 修改配件鉴定权
     * 
     * @param zsyhPlatformPartsCheck 配件鉴定权
     * @return 结果
     */
    @Override
    public int updateZsyhPlatformPartsCheck(ZsyhPlatformPartsCheck zsyhPlatformPartsCheck)
    {
        zsyhPlatformPartsCheck.setUpdateTime(DateUtils.getNowDate());
        return zsyhPlatformPartsCheckMapper.updateZsyhPlatformPartsCheck(zsyhPlatformPartsCheck);
    }

    /**
     * 删除配件鉴定权对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPlatformPartsCheckByIds(String ids)
    {
        return zsyhPlatformPartsCheckMapper.deleteZsyhPlatformPartsCheckByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除配件鉴定权信息
     * 
     * @param id 配件鉴定权ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPlatformPartsCheckById(Long id)
    {
        return zsyhPlatformPartsCheckMapper.deleteZsyhPlatformPartsCheckById(id);
    }

    public int deleteZsyhPlatformPartsCheckByStoreId(String storeId){
        return zsyhPlatformPartsCheckMapper.deleteZsyhPlatformPartsCheckByStoreId(storeId);
    }
}
